// import { Table, Button, Modal } from 'antd';
// import React,{Component, Children} from 'react';
// // import createContext from 'react';
// import fetch from 'cross-fetch';

// export default class ResultTable extends Component {
//     constructor(props)
//     {
//         super(props);
//         this.state = {
//               pdfUrl:"../cement.pdf",
//           };
//     }
    
 
//   render() {
//     const data = this.props.data;
//     const url = "http://127.0.0.1:5500/src/PDF/web/viewer.html?file=" + this.state.pdfUrl;
//     const columns = [{
//       title: '企业名称',
//       dataIndex:'comp_name',
//     }, {
//       title: '企业区域',
//       dataIndex: 'author',
//     }, {
//       title: '设计产能',
//       dataIndex: 'line_name',
//     },{
//         title: ' 可比熟料热耗',
//         dataIndex: 'line_size',
//       },{
//         title: '排放状况',
//         dataIndex: 'year_run_days',
//       },{
//         title:'操作',
//         dataIndex:'caozuo',
//         render : () => (
//           <span>
//             {/* <a href = "javascript:;" ><Xiangqing /></a> */}
//             <a href={url} target="view_window">
//                     <Button type="primary" style = {{float:'left',marginLeft:'5px'}} >查看PDF文档</Button>
//             </a>
//           </span>
//         ),
//       }];
//     return (
//       <div>
//         <Table  columns={columns}  dataSource={data} pagination = {{pageSize : 5}} />
//       </div>
//     );
//   }
// }

//创建调查问卷模板页面

import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import './Questionnaire.css';
import {Input, Radio} from 'antd';

// RadioGroup和options1-4是单选框
// 单选框部分开始
const RadioGroup = Radio.Group;
const options1 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
const options2 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
const options3 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
const options4 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
// 单选框部分结束
export default class Quset extends Component {

    render() {
        //定义input的value数组
        const data = this.props.groupData;
        return (
              <div>
                <div className="first">
                    <h2 style={{textAlign: 'center'}}>2015年水泥企业信息调研表</h2><br/>
                    <table className="table5">
                        <th>企业名称：</th>
                        <td style={{width: '26%'}}>
                        {data.compname}
                        </td>
                        <th>生产线名称：</th>
                        <td style={{width: '14%'}}>
                            {data.line_name}
                        </td>
                        <th>生产线设计规模：</th>
                        <td>
                            {data.line_size}
                        </td>
                        <th>年运转天数：</th>
                        <td>
                            {data.year_run_days}
                        </td>
                    </table>
                    <table className="table6">
                        <tr>
                            <th>企业所在地址：</th>
                            <td style={{width: '48%'}}>
                                {data.compaddress}
                            </td>
                            <th>填表联系人：</th>
                            <td>
                                {data.auditor}
                            </td>
                            <th>联系电话：</th>
                            <td>
                                {data.phone_num}
                            </td>
                        </tr>
                    </table>
                </div>
                <div className="second">
                    <table border="3" className="table1">
                        <tr>
                            <th rowSpan='8' style={{width: '2%'}}>资<br/>源<br/>消<br/>耗</th>
                            <th rowSpan='2' style={{width: '10%'}}>类别</th>
                            <th colSpan='6'>熟料烧成用原材料（含替代原料）</th>
                            <th colSpan='3'>燃料(含替代燃料)</th>
                            <th rowSpan='3' style={{width: '5%'}}>熟料<br/>产量</th>
                        </tr>
                        <tr>
                            <td>原料1</td>
                            <td>原料2</td>
                            <td>原料3</td>
                            <td>原料4</td>
                            <td>原料5</td>
                            <td>原料6</td>
                            <td>燃料1</td>
                            <td>燃料2</td>
                            <td>燃料3</td>
                        </tr>
                        <tr>
                            <th>原材料名称</th>
                            <td>
                                {data.zyxh_slsc_yl1_name}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl2_name}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl3_name}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl4_name}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl5_name}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl6_name}
                            </td>
                            <td>
                                {data.zyxh_rl_rl1_name}
                            </td>
                            <td>
                                {data.zyxh_rl_rl2_name}
                            </td>
                            <td>
                                {data.zyxh_rl_rl3_name}
                            </td>
                        </tr>
                        <tr>
                            <th>消耗情况，万吨/年</th>
                            <td>
                                {data.zyxh_slsc_yl1_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl2_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl3_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl4_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl5_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slsc_yl6_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_rl_rl1_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_rl_rl2_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_rl_rl3_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_shuliaocl}
                            </td>
                        </tr>
                        <tr>
                            <th rowSpan='2'>类别</th>
                            <th colSpan='9'>水泥制成用原材料（含替代原料）</th>
                            <th rowSpan='3'>水泥<br/>产量</th>
                        </tr>
                        <tr>
                            <td>原料1</td>
                            <td>原料2</td>
                            <td>原料3</td>
                            <td>原料4</td>
                            <td>原料5</td>
                            <td>原料6</td>
                            <td>原料7</td>
                            <td>原料8</td>
                            <td>原料9</td>
                        </tr>
                        <tr>
                            <th>原材料名称</th>
                            <td>
                                {data.zyxh_slzcylc_yl1_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl2_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl3_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl4_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl5_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl6_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl7_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl8_name}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl9_name}
                            </td>
                        </tr>
                        <tr>
                            <th>消耗情况，万吨/年</th>
                            <td>
                                {data.zyxh_slzcylc_yl1_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl2_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl3_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl4_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl5_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl6_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl7_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl8_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_slzcylc_yl9_xiaohao}
                            </td>
                            <td>
                                {data.zyxh_shuinicl}
                            </td>
                        </tr>
                    </table>
                    <table border="3" className="table2">
                        <tr>
                            <th rowSpan='3'>能源消耗</th>
                            <th>项目</th>
                            <th>生料粉磨<br/>工段电耗</th>
                            <th>可比熟料<br/>综合煤耗</th>
                            <th>可比熟料<br/>综合电耗</th>
                            <th>可比熟料<br/>综合能耗</th>
                            <th>可比水泥<br/>综合电耗</th>
                            <th>可比水泥<br/>综合能耗</th>
                            <th>单位熟料<br/>余热发电量</th>
                        </tr>
                        <tr>
                            <th>单位</th>
                            <td>kWh/t</td>
                            <td>kgce/t</td>
                            <td>kWh/t</td>
                            <td>kgce/t</td>
                            <td>kWh/t</td>
                            <td>kgce/t</td>
                            <td>kWh/t</td>
                        </tr>
                        <tr>
                            <th>数值</th>
                            <td>
                                {'生料电耗缺少'}
                            </td>
                            <td>
                                {'熟料煤耗缺少'}
                            </td>
                            <td>
                                {data.nyxh_shuliao_dianhao}
                            </td>
                            <td>
                                {data.nyxh_shuliao_nenghao}
                            </td>
                            <td>
                                {data.nyxh_shuini_dianhao}
                            </td>
                            <td>
                                {data.nyxh_shuini_nenghao}
                            </td>
                            <td>
                                {data.nyxh_shuliao_fadian}
                            </td>
                        </tr>
                    </table>
                    <table border="3" className="table3">
                        <tr>
                            <th rowSpan='5'>废气排放</th>
                            <th rowSpan='2'>项目</th>
                            <th colSpan='5'>颗粒物</th>
                            <th>SO2</th>
                            <th>NOX</th>
                            <th>喷氨</th>
                            <th colSpan='3'>脱硝工艺(划勾)</th>
                        </tr>
                        <tr>
                            <th>窑头</th>
                            <th>窑尾</th>
                            <th>水泥磨</th>
                            <th>煤磨</th>
                            <th>包装机*</th>
                            <th>窑尾</th>
                            <th>窑尾</th>
                            <th>kg/t熟料</th>
                            <th style={{width: '3%'}}>1</th>
                            <th>SNCR</th>
                            <th>
                             {data.fqpf_txgy_SNCR}
                            </th>
                        </tr>
                        <tr>
                            <th>年排放量，吨/年</th>
                            <td>
                                {data.fqpf_keliwu_yt_paifang}
                            </td>
                            <td>
                                {data.fqpf_keliwu_yw_paifang}
                            </td>
                            <td>
                                {data.fqpf_keliwu_snm_paifang}
                            </td>
                            <td>
                                {data.fqpf_keliwu_mm_paifang}
                            </td>
                            <td>
                                {data.fqpf_keliwu_bzj_paifang}
                            </td>
                            <td>
                                {data.fqpf_SO2_yw_paifang}
                            </td>
                            <td>
                                {data.fqpf_NOX_yw_paifang}
                            </td>
                            <th rowSpan='2'>
                                {data.fqpf_pa_shuliao_paifang}
                            </th>
                            <th>2</th>
                            <th>分级燃烧</th>
                            <th>
                             {data.fqpf_txgy_fjrs}
                            </th>
                        </tr>
                        <tr>
                            <th>排放浓度，mg/m3</th>
                            <td>
                              222
                            </td>
                            <td>
                             12
                            </td>
                            <td>
                             21
                            </td>
                            <td>
                             333
                            </td>
                            <td>
                             123
                            </td>
                            <td>
                             222
                            </td>
                            <td>
                             123
                            </td>
                            <th>3</th>
                            <th>1+2</th>
                            <th>
                                {data.fqpf_oneplustwo}
                            </th>
                        </tr>
                        <tr>
                            <th>除尘方式（电/袋)</th>
                            <td>
                              1
                            </td>
                            <td>
                             2
                            </td>
                            <td>
                             3
                            </td>
                            <td>
                             4
                            </td>
                            <td>
                             1
                            </td>
                            <td>
                             2
                            </td>
                            <td>
                            3
                            </td>
                            <td>
                             3
                            </td>
                            <th>4</th>
                            <th>其它</th>
                            <th>
                                {data.fqpf_txgy_qita}
                            </th>
                        </tr>
                    </table>
                    <table border="3" className="table4">
                        <tr>
                            <th rowSpan='3'>主要设备</th>
                            <th rowSpan='2'>设备名称</th>
                            <th colSpan='3'>生料磨</th>
                            <th>窑</th>
                            <th colSpan='3'>水泥磨</th>
                        </tr>
                        <tr>
                            <th>粉磨方式</th>
                            <th>规格型号</th>
                            <th>数量</th>
                            <th>规格</th>
                            <th>粉磨方式</th>
                            <th>规格型号</th>
                            <th>数量</th>
                        </tr>
                        <tr>
                            <th>设备情况</th>
                            <td>
                                {data.zysb_shengliao_fenmo_qingkuang}
                            </td>
                            <td>
                                {data.zysb_shengliao_xinghao}
                            </td>
                            <td>
                                {data.zysb_shengliao_shuliang}
                            </td>
                            <td>
                                {data.zysb_yao_guige}
                            </td>
                            <td>
                                {data.zysb_shuinimo_fenmo}
                            </td>
                            <td>
                                {data.zysb_shuinimo_guige}
                            </td>
                            <td>
                                {data.zysb_shuinimo_shuliang}
                            </td>
                        </tr>
                    </table>
                </div>
              </div>
        )  
  }

}




